<template>
  <div style="margin-left: 18%">
    <div>
      <div align="left" style="float: right">
        <el-input v-model="search" placeholder="请输入用户账户"></el-input>
      </div>
      <div align="right">
        <el-button class="modify" type="primary" round @click="searchFunction()">搜索</el-button>
      </div>
    </div>
    <div>
      <wordCloudVue :search="search" ref="wordCloud" />
    </div>
    <divider />
    <moviePushTop8 :search2="search2" ref="movieTop8" />
  </div>
</template>
<script setup>
import wordCloudVue from '../../components/Admin/components/wordCloud'
import divider from '../../components/Admin/components/divider'
import moviePushTop8 from '../../components/Admin/components/moviePushTop8'
import { onMounted, ref, watch } from 'vue'
const search = ref(1)
const search2 = ref(1)

onMounted(() => {
  search2.value = search.value
})

watch(search, () => {
  search2.value = search.value
})

const wordCloud = ref()
const movieTop8 = ref()
function searchFunction() {
  movieTop8.value.getData()
  wordCloud.value.getData()
}
</script>
